package com.czk.model.template.spring;

/**
 * @Author:ChenZhangKun
 * @Date: 2021/10/28 22:08
 */
public abstract class AbstractMerchantService {
    public void find() {
        System.out.println("查询商户信息");
    }

    public void signature() {
        System.out.println("对请求报文加签");
    }

    public abstract boolean httpRequest();

    public void handler() {
        find();
        signature();
        if (httpRequest()) {
            sendWithProxy();
        } else {
            sendWithoutProxy();
        }
    }

    public void sendWithProxy() {
        System.out.println("走加签道路");
    }

    public void sendWithoutProxy() {
        System.out.println("走不加钱道路");
    }
}
